<?php
$bookingPayerInfoStr = Yii::t('BWeSport', 'booking payer info');
$payerCardNumStr = Yii::t('BWeSport', 'payer card num');
$payerMobileStr = Yii::t('BWeSport', 'payer mobile');
$payerNameStr = Yii::t('BWeSport', 'payer name');
$closeStr = Yii::t('BWeSport', 'Close');
?>
<?php
$payer = new BUser($payerId);
$payerInfo = $payer->getAttribute('userInfo');
$attributes = array();
if ($payerInfo) {
    $attributes = $payerInfo->getChildren();
}
?>
<div class="modal-body" >
    <legend> 
       <?php echo $bookingPayerInfoStr;?>
    </legend>


    <div class="form" style="padding-left: 30px">    
        <p><strong><?php echo $payerCardNumStr.'：'; ?></strong><span class="text-warning"><?php echo $payerId; ?></span></p>
        <p><strong><?php echo $payerNameStr.'：'; ?></strong><span class="text-warning"><?php echo $payer->getName(); ?></span></p>
        <?php
        foreach ($attributes as $attr) {
            if($attr->getName() == 'mobile')
                echo '<p><strong>'.$payerMobileStr.'：</strong><span class="text-warning">'.$attr->getValue().'</span></p>';
        }
        ?>
    </div>
</div>
<div class = "modal-footer">
    <button data-dismiss = 'modal' aria-hidden = 'true'><?php echo $closeStr;?></button>       
</div>
